

import queue
import threading
import numpy as np


queue1 = queue.Queue(200)

def do_input():
    idx = 0
    array = np.array([idx, idx])
    while True:
        
        queue1.put([idx, array])
        print(f"put {[idx, array]}\n")
        idx = idx + 1
        array[0] = idx
        array[1] = idx



def do_read():

    while True:
        print(f"read {queue1.get()}\n") 


if __name__ == "__main__":
    thread = threading.Thread(target=do_input)
    thread.start()

    thread_udp = threading.Thread(target=do_read)
    thread_udp.start()

    thread_udp.join()

    print("thread end.")
    